package com.example.demo.config;

import cn.hutool.crypto.symmetric.AES;
import com.example.demo.config.ben.AliDaYu;
import com.example.demo.config.ben.ImgUpload;
import com.example.demo.config.ben.Qiniu;
import lombok.AllArgsConstructor;
import lombok.Data;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/*
 * @Author:大力王
 * @Date:2024/6/3-03-12:45
 * 开始了
 */
@Configuration
@AllArgsConstructor
public class ShopBeanConfig {
    private final ShopBasicConfig shopBasicConfig;

    @Bean
    public Qiniu qiniu() {
        return shopBasicConfig.getQiniu();
    }

//    @Bean
//    public AES tokenAes() {
//        return new AES(shopBasicConfig.getTokenAesKey().getBytes());
//    }
//
//    @Bean
//    public AliDaYu aLiDaYu () {
//        return shopBasicConfig.getALiDaYu();
//    }

    @Bean
    public ImgUpload imgUploads() {
        return shopBasicConfig.getImgUpload();
    }
}
